<div class="animated fadeInRight ecommerce">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="查询条件" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" v-on:click="_moreCondition()">
                            {{allocationStorehousesInfo.moreCondition == true?'隐藏':'更多'}}
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">
                            <select class="custom-select" v-model="allocationStorehousesInfo.conditions.applyType">
                                <option selected value="">{{vc.i18n('请选择类型','allocationStorehouseDetailed')}}</option>
                                <option v-for="(item,index) in allocationStorehousesInfo.applyTypes" :key="index" :value="item.statusCd">
                                    {{item.name}}
                                </option>
                            </select>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <select class="custom-select" v-model="allocationStorehousesInfo.conditions.shIda">
                                    <option selected value="">{{vc.i18n('必填，请选择源仓库','allocationStorehouseDetailed')}}</option>
                                    <option v-for="(item,index) in allocationStorehousesInfo.storehouses"
                                            :key="index" v-bind:value="item.shId">
                                        {{item.shName}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <select class="custom-select" v-model="allocationStorehousesInfo.conditions.shIdz">
                                    <option selected value="">{{vc.i18n('必填，请选择目标仓库','allocationStorehouseDetailed')}}</option>
                                    <option v-for="(item,index) in allocationStorehousesInfo.storehouses"
                                            :key="index" v-bind:value="item.shId">
                                        {{item.shName}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryAllocationStorehouseMethod()">
                                <i class="fa fa-search"></i> <span><vc:i18n name="查询" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                            </button>
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_resetAllocationStorehouseMethod()">
                                <i class="fa fa-repeat"></i> <span><vc:i18n name="重置" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                            </button>
                        </div>
                    </div>
                    <div class="row" v-show="allocationStorehousesInfo.moreCondition == true">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入申请人ID','allocationStorehouseDetailed')" v-model="allocationStorehousesInfo.conditions.startUserId" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入物品ID','allocationStorehouseDetailed')" v-model="allocationStorehousesInfo.conditions.resId" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入物品名称','allocationStorehouseDetailed')" v-model="allocationStorehousesInfo.conditions.resName" class=" form-control">
                            </div>
                        </div>
                    </div>
                    <div class="row" v-show="allocationStorehousesInfo.moreCondition == true">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <select class="custom-select" v-model="allocationStorehousesInfo.conditions.parentRstId" @change="_listResourceStoreSonTypes">
                                    <option selected value="">{{vc.i18n('请选择物品类型','allocationStorehouseDetailed')}}</option>
                                    <option v-for="(item,index) in allocationStorehousesInfo.resourceStoreTypes" :key="index"
                                        v-bind:value="item.rstId">
                                        {{item.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="input-group">
                                <select class="custom-select" v-model="allocationStorehousesInfo.conditions.rstId" @change="_listResourceStoreSpecifications">
                                    <option selected value="">{{vc.i18n('请选择二级分类','allocationStorehouseDetailed')}}</option>
                                    <option v-for="(item,index) in allocationStorehousesInfo.resourceStoreSonTypes" :key="index"
                                        v-bind:value="item.rstId">
                                        {{item.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <select class="custom-select" v-model="allocationStorehousesInfo.conditions.rssId">
                                    <option selected value="">{{vc.i18n('请选择物品规格','allocationStorehouseDetailed')}}</option>
                                    <option v-for="(item,index) in allocationStorehousesInfo.resourceStoreSpecifications" :key="index"
                                        v-bind:value="item.rssId">
                                        {{item.specName}}
                                    </option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="row" v-show="allocationStorehousesInfo.moreCondition == true">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入调拨申请ID','allocationStorehouseDetailed')" v-model="allocationStorehousesInfo.conditions.applyId" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <select class="custom-select" v-model="allocationStorehousesInfo.conditions.state">
                                <option selected value="">{{vc.i18n('请选择调拨状态','allocationStorehouseDetailed')}}</option>
                                <option v-for="(item,index) in allocationStorehousesInfo.states" :key="index"
                                        :value="item.statusCd">{{item.name}}
                                </option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="调拨明细" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportExcel()">
                            <i class="fa fa-plus"></i><span><vc:i18n name="导出" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                            <tr>
                                <th class="text-center">
                                    <span><vc:i18n name="调拨申请ID" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="物品ID" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="物品类型" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="物品名称" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="物品规格" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="是否是固定物品" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="被调仓库原库存" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="调拨数量" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="被调仓库" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="目标仓库" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="申请人ID" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="申请人" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="调拨说明" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="状态" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                                <th class="text-center">
                                    <span><vc:i18n name="时间" namespace="allocationStorehouseDetailed"></vc:i18n></span>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="resourceStore in allocationStorehousesInfo.resourceStores">
                                <td class="text-center">{{resourceStore.applyId}}</td>
                                <td class="text-center">{{resourceStore.resId}}</td>
                                <td class="text-center">{{resourceStore.parentRstName}} > {{resourceStore.rstName}}</td>
                                <td class="text-center">{{resourceStore.resName}}</td>
                                <td class="text-center">{{resourceStore.specName ? resourceStore.specName : '-'}}</td>
                                <td class="text-center">{{resourceStore.isFixedName}}</td>
                                <td class="text-center">{{resourceStore.originalStock}}{{resourceStore.unitCodeName}}</td>
                                <td class="text-center">{{resourceStore.stock}}{{resourceStore.applyType==20000 ? resourceStore.miniUnitCodeName : resourceStore.unitCodeName}}</td>
                                <td class="text-center" v-if="resourceStore.applyType == '20000'">{{resourceStore.startUserName}}</td>
                                <td class="text-center" v-else>{{resourceStore.shaName}}</td>
                                <td class="text-center">{{resourceStore.shzName}}</td>
                                <td class="text-center">{{resourceStore.startUserId}}</td>
                                <td class="text-center">{{resourceStore.startUserName}}</td>
                                <td class="text-center">{{resourceStore.remark}}</td>
                                <td class="text-center">{{resourceStore.stateName}}</td>
                                <td class="text-center">{{resourceStore.createTime}}</td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="15">
                                    <ul class="pagination float-right"></ul>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
</div>
